package com.xuecheng.api.course;

import com.xuecheng.framework.domain.course.*;
import com.xuecheng.framework.domain.course.ext.CourseView;
import com.xuecheng.framework.domain.course.ext.TeachplanNode;
import com.xuecheng.framework.domain.course.request.CourseListRequest;
import com.xuecheng.framework.domain.course.response.CoursePublishResult;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.sql.ResultSet;

/**
 * Created by Administrator.
 */
@Api(value="课程管理接口",description = "课程管理接口，提供课程的增、删、改、查")
public interface CourseControllerApi {

    @ApiOperation("课程查询")
    public QueryResponseResult findCourseList(int page, int size, CourseListRequest courseListRequest);

    @ApiOperation("新增课程")
    public ResponseResult addCourseBase(CourseBase courseBase);

    /**
     * 根据课程id查询课程信息
     * @param courseId
     * @return
     */
    @ApiOperation("根据课程id查询课程信息")
    CourseBase getCourseBaseByCourseId(String courseId);

    /**
     * 更新课程信息
     * @param id
     * @param courseBase
     * @return
     */
    @ApiOperation("更新课程信息")
    ResponseResult updateCourseBase(String id, CourseBase courseBase);

    /**
     * 查询课程营销信息
     * @param courseId
     * @return
     */
    @ApiOperation("查询课程营销信息")
    CourseMarket getCourseMarketById(String courseId);

    /**
     * 更新课程营销信息
     * @param courseId
     * @param courseMarket
     * @return
     */
    @ApiOperation("更新课程营销信息")
    ResponseResult updateCourseMarket(String courseId, CourseMarket courseMarket);

    @ApiOperation("课程计划查询")
    public TeachplanNode findTeachplanList(String courseId);

    @ApiOperation("获取课程计划信息")
    public Teachplan getTeachPlan(String id);

    @ApiOperation("添加课程计划")
    public ResponseResult addTeachplan(Teachplan teachplan);

    @ApiOperation("修改课程计划")
    public ResponseResult updateTeachPlan(Teachplan teachplan);

    @ApiOperation("删除课程计划")
    public ResponseResult deleteTeachPlan(String id);

    @ApiOperation("添加课程图片")
    public ResponseResult addCoursePic(String courseId,String pic);

    @ApiOperation("查询课程图片")
    public CoursePic findCoursePic(String courseId);

    @ApiOperation("删除课程图片")
    public ResponseResult deleteCoursePic(String courseId);

    @ApiOperation("课程视图查询")
    public CourseView courseview(String id);

    @ApiOperation("课程预览")
    public CoursePublishResult preview(String id);

    @ApiOperation("课程发布")
    public CoursePublishResult publish(String id);

    @ApiOperation("保存课程计划和媒资文件的关联")
    public ResponseResult savemedia(TeachplanMedia teachplanMedia);


}
